Every time I use strtodate or datetostr, I always worry about developing and applying VCL components.
Http://www.delphi2007.net/DelphiVCL/html/delphi_20061220141719247.html
Every time I use strtodate or datetostr, I am always worried.
Because my
Public class vedate {/*** get current time ** @ return returns the time type yyyy-mm-dd hh: mm: SS */public static date getnowdate () {date currenttime = new date (); simpledateformat formatter = new simpledateformat ("yyyy-mm-dd hh: mm: SS");
Protected List getYears (Long userno, String end) throws Exception {List returnList = new ArrayList (); // obtain the year (obtain the year List based on the current employee ID, release schedule, and log earliest time) List cjsjSch = this.
Also collects a good Java time format encyclopedia, this is made of the class
Java.util. *;
Import Java.text. * ;
Import Java.util.Calendar;
public class Vedate {
/**
* Get now time
*
* @return return Time type YYYY-MM-DD HH:MM:SS
*/
public static
When using Delphi for database design, it is inevitable that the input problem of date type fields will be involved. However, compared with Microsoft Access 97 Chinese version, the format of the date-type fields provided by Delphi is not suitable
Now we have used the last day of the month, and tried it with the date in SQL. An error occurred, so we must use a valid date,The followingCodeIs used in the test
Procedure tform1.button1click (Sender: tobject );VaRFisc: string;SS: string;M1,
The following summarizes the implementation methods for obtaining a specified date in Java. For more information, seeCopy codeThe Code is as follows:Format a Date String --> Date or Data --> String
SimpleDateFormat sdf = new SimpleDateFormat
Java get millisecond: system. currenttimemillis () Java get nanosecond: system. nanotime () (used to get very accurate time, recommended !) Java obtains the current date: gregoriancalendar date_1 = (gregoriancalendar) calendar. getinstance (); Java.
Format Date string-->date or data-->string simpledateformat sdf = new SimpleDateFormat ("Yyyy-mm-dd"); Date date = Sdf.parse ("2009-11-04");//string-->date String sdate = Sdf.format (date);//Data-->string ===========
=================================
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.